Get Detection Result of Color Sensor

  • Function:

    magicbox.get_color_result(port)
    
  • Description: get data of color sensor

  • Required parameter:

    • port: controller port, range: 1~6
  • Return:
    • color: result of color sensor. None: no color; red; green; blue; yellow; black; white
  • Example

    res = magicbox.get_color_result(port=1)
    print(res)
    

    Get the result of color sensor connected to Port 1 of controller.

results matching ""

    No results matching ""